package com.infovane.service.impl;

import java.util.List;

import com.infovane.dao.BaseDao;
import com.infovane.service.TopicService;

public class TopicServiceImpl implements TopicService{
	private BaseDao baseDao;
	
	public BaseDao getBaseDao() {
		return baseDao;
	}

	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}
	/**
	 * 添加专题对象
	 * @param Object
	 * @return boolean
	 * */
	public boolean add(Object object) {
		return this.baseDao.save(object);
	}
	
	/**
	 * 获取专题集合
	 * @param first,count
	 * @return List
	 * */
	public List getTopicList(int first, int count) {
		String hql="from TTopic as t order by t.topicCreateTime desc";
		return this.baseDao.load(hql, first, count);
	}

}
